package com.zsummer.zero.jdk;

import java.math.BigDecimal;
import java.math.RoundingMode;

public class BigDecimalDemo {
	
	public static void main(String[] args) {
		BigDecimal b1 = new BigDecimal("1.22");
		BigDecimal b2 = new BigDecimal("2.22");
		
		BigDecimal divide = b1.divide(b2,1, RoundingMode.HALF_UP);
		System.out.println(divide);
		
		System.out.println(divide.negate());
		
		System.out.println(divide.negate().plus());
		
		System.out.println(divide.negate().abs());
	}

}
